using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

using IGlobalist.Cms.Model;

namespace IGlobalist.Cms.DataAccess
{
    public interface IClassTypeDAO
    {
        ICmsClassType GetClassType(short id);
        IList<ICmsClassType> GetClassTypeList();
    }
    public interface IClassDAO
    {
        ICmsClass GetClass(long id);
        ICmsClass GetClassByName(string name);
        IList<ICmsClass> GetAllClassList();
        IList<ICmsClass> GetClassListByClassTypeID(short classTypeID);
        long InsertClass(ICmsClass clazz);
        void UpdateClass(ICmsClass clazz);
        void DeleteClass(long id);
    }
    public interface IObjectDAO
    {
        ICmsObject GetObject(long id);
        IList<ICmsObject> GetObjectAllVersion(long firstVersionID);
        IList<ICmsObject> GetObjectListByClassID(long classID);
        IList<ICmsObject> GetTopObjectListByClassID(long classID);
        IList<ICmsObject> GetObjectListByname(string name);
        
        IList<ICmsObject> GetTopObjectListByClassTypeID(short classTypeID);

        IList<ICmsObject> GetObjectListAllByClassTypeID(short classTypeID);
        IList<ICmsObject> GetObjectListAllBySearch(string search);
        IList<ICmsObject> GetObjectListAllByAdvancedSearch(Hashtable search);
        
        IList<ICmsObject> GetObjectListRelateToObjectID(long relateObjectID, short classTypeID);
        long InsertObject(ICmsObject obj);
        void InsertObjectRelation(long id1, long id2, short classTypeID);
        void UpdateObject(ICmsObject obj);
        void DeleteObject(long id);
        void DeleteObjectAllVersion(long firstVersionID);
        void DeleteObjectRelation(long id);
        void DeleteObjectOneRelation(long parentID, long subID);
    }


    public interface ISequenceDao
    {
        int GetNextID(string name);
    }
}
